﻿using System.Windows.Forms;
using GatewayInspect.Common;

namespace GatewayInspect
{
    public partial class PopupForm : Form
    {
        public PopupForm()
        {
            InitializeComponent();
        }

        protected bool IsActive
        {
            get
            {
                if (ModuleUtils.GetForegroundWindow() != this.Handle)
                {
                    return false;
                }
                return true;
            }
        }

        protected virtual void OnLoad()
        {
        }

        protected virtual void OnClosed()
        {
        }

        private void PopupForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            OnClosed();
        }

        private void PopupForm_Load(object sender, System.EventArgs e)
        {
            OnLoad();
        }
    }
}
